Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Retweet Return Information #228

Merged
merged 2 commits into from
Jan 19, 2012
Merged

Fix Retweet Return Information #228

merged 2 commits into from
Jan 19, 2012

Conversation

kunalmodi
Copy link
Contributor

Twitter.retweet should return the original status with tweet.retweeted_status returning the newly created tweet information (including the new id, so we can delete the retweet directly if the user wants). Right now, the new status information is completely removed.

The API returns the information reversed (the new status information, with 'retweeted_status' containing the original tweet information), but I figure doing that would mess up a lot of existing code

Twitter::Status.new(status)
new_status = post("/1/statuses/retweet/#{id}.json", options)
orig_status = new_status['retweeted_status']
new_status.delete('retweeted_status')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to replace lines 134 and 135 with:

orig_status = new_status.delete('retweeted_status')

sferik added a commit that referenced this pull request Jan 19, 2012
Fix Retweet Return Information
@sferik sferik merged commit 983be99 into sferik:master Jan 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants